import Taro, { Component } from '@tarojs/taro'
import { Swiper, SwiperItem, Image, View, Text } from '@tarojs/components'
import Goodshearder from './goodshearder'
import CommonJs from '../../utils/common'
import './my.scss'

export default class Index extends Component {
  constructor(props) {  
  	super(props);
    this.state = {

    }
  }
  config = {
    navigationBarTitleText: '设置'
  }

  componentWillMount () {

  }
  opento(url){
    CommonJs.openTo(url);
  }
  open(url){
    CommonJs.open(url);
  }
  logout(url){
	 Taro.setStorage({key:'dateinfo',data:''})
	 Taro.setStorage({key:'userinfo',data:''})
	 CommonJs.open(url);
  }
  render () {
    
    return (
      <View className='page'>
        <View className='home-set'>
          <View className='set-l' onClick={this.opento.bind(this,'/pages/my/address')}>
            <Text className=''>收货地址设置</Text>
          </View>
          <View className='set-l' onClick={this.opento.bind(this,'/pages/my/pwdset?type=loginpwd')}>
            <Text className=''>登录密码设置</Text>
          </View>
          <View className='set-l' onClick={this.opento.bind(this,'/pages/my/pwdset')}>
            <Text className=''>支付密码设置</Text>
          </View>
          <View className='set-l' onClick={this.opento.bind(this,'/pages/my/bank')}>
            <Text className=''>银行卡管理</Text>
          </View>
        </View>
		<View className='btn01' onClick={this.logout.bind(this,'/pages/login/login')}>退出登录</View>
      </View>
    )
  }
}